package com.bw.transraction.service.impl;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import com.bw.transraction.SpringTransractionApplication;
import com.bw.transraction.model.User;

@SpringBootTest(classes = SpringTransractionApplication.class)
public class TransractionApplication
{
    @Autowired
    public UserService2 userService2;
    
    /**
     * 测试事务方法不为public修饰
     */
    @Test
    public void testNotPublic()
    {
        User user = new User();
        user.setId("123456789");
        user.setName("test");
        user.setPassword("123456");
        user.setAge(10);
        userService2.testNotPublic(user);
    }
}
